<template>
    <div>
      <van-popup v-model="show" position="right" @click-overlay="bigImg" >
        <img :src=src @click="bigImg">
      </van-popup>
    </div>
</template>

<script type="text/ecmascript-6">
  import { Popup } from 'vant';
  import Vue from 'vue';
  Vue.use(Popup);
  export default {
    name: 'bigImg',

    data () {
      return {
        show: false
      };
    },
    props: {
      src: String,
      bigShow: false
    },
    created () {
    },
    methods: {
      bigImg() {
        this.$emit('clickBig');
      }
    },
    computed: {
    },
    watch: {
      bigShow(val) {
        this.show = val;
      }
    }
  };
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
 img {
    max-width: 100%;
    display: block;
    position: relative;
    left: 0;
    right: 0;
    margin: auto;
    z-index: 1000;
  }
</style>
